#!/usr/bin/python
# -*- coding: utf-8 -*-
#Under the terms of the General Public License v.3
#For more information see LICENSE.txt

#from Element import *
from pygame.locals import K_LEFT, K_RIGHT, K_UP, K_DOWN, QUIT, KEYDOWN
import pygame

class Player (object):

	"""

	:version:
	:author:
	"""

	""" ATTRIBUTES

	 Speed in X

	speedX  (private)

	 Speed in Y

	speedY  (private)

	"""

	def __init__(self,map):
		#Element.__init__(self, image, posX, posY)
		self.map = map

	#def setSpeedX(self, speedX):
		#"""

		#@return  :
		#@author
		#"""
		#self.speedX = speedX

	#def setspeedY(self, speedY):
		#"""

		#@return  :
		#@author
		#"""
		#self.speedY = speedY

	#def getSpeedX(self):
		#"""

		#@return int :
		#@author
		#"""
		#return self.speedX = speedX

	#def getSpeedY(self):
		#"""

		#@return int :
		#@author
		#"""
		#return self.speedY = speedY

	def updatePosition(self):
		"""
		 Update the position of the element

		@return  :
		@author
		"""
		keysPressed = pygame.key.get_pressed()

		if keysPressed[K_UP]:
			self.map.move(0, -5)
		elif keysPressed[K_DOWN]:
			self.map.move(0, 5)

		if keysPressed[K_LEFT]:
			self.map.move(-5, 0)
		elif keysPressed[K_RIGHT]:
			self.map.move(5, 0)

		#return self.posX = newPosX
		#return self.posY = newPosY

	def checkBoundColision(self, posX, posY, ):
		"""
		 Checks colitions betwen two thinks.

		@return  :
		@author
		"""




